<?php
/**
 * RedCross Application
 *
 * @copyright Copyright (c) 2010, Kristian Stokke Tryggestad, Rune Vikestad, Andreas Flaten Wist, Simen Nicolai Echholt, Ole Henrik Jahren
 */


class RedCross_Paginator extends Zend_Paginator
{
    /**
     * Get new doctrine query paginator
     *
     * @param Doctrine_Query $query
     * @param int $limit
     * @param int $page
     */
    public function __construct(Doctrine_Query $query, $page = 1, $limit = 25)
    {
        parent::__construct(new RedCross_Paginator_Adapter_DoctrineQuery($query));

        $this->setItemCountPerPage($limit);
        $this->setCurrentPageNumber($page);
    }
}
